Skip to content

On mobile link redirect fix - #13

Merged
botelho merged 7 commits into
codrops:masterfrom
OneHedgehog:on-mobile-link-redirect-fix
Aug 3, 2018
Merged

botelho merged 7 commits into
codrops:masterfrom
OneHedgehog:on-mobile-link-redirect-fix

Conversation

@OneHedgehog

Copy link
Copy Markdown

The prev version of my request had a trouble. If user put some element inside <a> for example
span
<div><a href="http://tympanus.net/Development/BookBlock/"><h4>BookBlock <span>Content flip plugin</span></h4></a></div> on touch start event listener have a span tag as a target
event.target.tagName === 'A' return false and we user can't follow via link

It seems, the only right way is remove event.preventDefault from Dragabilly lib. This what I'm trying to do with this pull request

Also, you can't just update version of Draggabilly ( I tried ). The reason, is that ElasticStack uses Draggabillys events wrapper, which is remove in laters version ( 2+ )

How to check:

  1. Modify your code in master branch, and put some tags inside <a>
  2. Enable in devtool mobile mode and try to follow a link ( you don't )
  3. Checkout to this branch and repeat

@botelho
botelho merged commit 2062b3a into codrops:master Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants